<?php 
session_start();
include_once '../config.php';
$usrID=intval($_SESSION['usrID']);
$recID=intval($_GET['recID']);
$res=$pdo->query("select * from chat where usrID=$recID and recID=$usrID and seen=0");//unix_timestamp()
echo ($res->rowCount());
?>
